//
//  xpath.h
//  LilyBBS
//
//  Created by 李行 on 11-11-5.
//  Copyright 2011年 __MyCompanyName__. All rights reserved.
//

#ifndef LilyBBS_xpath_h
#define LilyBBS_xpath_h
//十大
#define TOP10               @"http://bbs.nju.edu.cn/bbstop10"
#define TOP10_TITLE         @"//tr/td[3]/a"
#define TOP_HREF            @"//tr/td[3]/a/@href"
#define TOP10_BOARD         @"//tr/td[2]/a"
#define TOP10_AUTHOR        @"//tr/td[4]/a"
#define TOP10_FOLLOWNUMBER  @"//tr[position()>1]/td[5]"
#define TOP10_HREF          @"//tr/td[3]/a/@href"


//文章具体信息
#define FLOORS              @"//tr/td[2]"
#define AUTHOR              @"//tr/td/a[3]"
#define CONTENT             @"//textarea" //取出的内容并不全是文章内容，还包括日期等其他信息
#define IP                  @"((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)"

//各区热点
#define TOP_ALL             @"http://bbs.nju.edu.cn/vd37429/bbstopall"

#define TOP_ALL1_TITLE      @"//tr[td/img[@src='/images/fb1.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL1_BOARD      @"//tr[td/img[@src='/images/fb1.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL1_HREF      @"//tr[td/img[@src='/images/fb1.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb2.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL2_TITLE      @"//tr[td/img[@src='/images/fb2.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL2_BOARD      @"//tr[td/img[@src='/images/fb2.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL2_HREF      @"//tr[td/img[@src='/images/fb2.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb3.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL3_TITLE      @"//tr[td/img[@src='/images/fb3.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL3_BOARD      @"//tr[td/img[@src='/images/fb3.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL3_HREF      @"//tr[td/img[@src='/images/fb3.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb4.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL4_TITLE      @"//tr[td/img[@src='/images/fb4.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL4_BOARD      @"//tr[td/img[@src='/images/fb4.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL4_HREF      @"//tr[td/img[@src='/images/fb4.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb5.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL5_TITLE      @"//tr[td/img[@src='/images/fb5.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL5_BOARD      @"//tr[td/img[@src='/images/fb5.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL5_HREF      @"//tr[td/img[@src='/images/fb5.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb6.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL6_TITLE      @"//tr[td/img[@src='/images/fb6.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL6_BOARD      @"//tr[td/img[@src='/images/fb6.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL6_HREF      @"//tr[td/img[@src='/images/fb6.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb7.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL7_TITLE      @"//tr[td/img[@src='/images/fb7.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL7_BOARD      @"//tr[td/img[@src='/images/fb7.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL7_HREF      @"//tr[td/img[@src='/images/fb7.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb8.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL8_TITLE      @"//tr[td/img[@src='/images/fb8.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL8_BOARD      @"//tr[td/img[@src='/images/fb8.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL8_HREF      @"//tr[td/img[@src='/images/fb8.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb9.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL9_TITLE      @"//tr[td/img[@src='/images/fb9.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL9_BOARD      @"//tr[td/img[@src='/images/fb9.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL9_HREF      @"//tr[td/img[@src='/images/fb9.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb10.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL10_TITLE      @"//tr[td/img[@src='/images/fb10.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL10_BOARD      @"//tr[td/img[@src='/images/fb10.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL10_HREF      @"//tr[td/img[@src='/images/fb10.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb11.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL11_TITLE      @"//tr[td/img[@src='/images/fb11.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())]/td/a[1]"
#define TOP_ALL11_BOARD      @"//tr[td/img[@src='/images/fb11.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())]/td/a[2]"
#define TOP_ALL11_HREF      @"//tr[td/img[@src='/images/fb11.gif']]/following-sibling::node()[count(.|//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())=count(//tr[td/img[@src='/images/fb12.gif']]/preceding-sibling::node())]/td/a[1]/@href"

#define TOP_ALL12_TITLE      @"//tr[td/img[@src='/images/fb12.gif']]/following-sibling::node()/td/a[1]"
#define TOP_ALL12_BOARD      @"//tr[td/img[@src='/images/fb12.gif']]/following-sibling::node()/td/a[2]"
#define TOP_ALL12_HREF      @"//tr[td/img[@src='/images/fb12.gif']]/following-sibling::node()/td/a[1]/@href"

#endif
